package com.smh.a04FuncationQuoteDemo1;

import java.util.ArrayList;
import java.util.Collections;

public class FunctionDemo4 {
    public static void main(String[] args) {
        //引用构造方法,就是为了创建对象
        ArrayList<String>list = new ArrayList<>();
        Collections.addAll(list,"asd,12","zxc,14","qwe,23");



        list.stream().map(s -> new Student(s.split(",")[0],Integer.parseInt(s.split(",")[1]))).forEach(System.out::println);

        //添加对应的构造方法
        list.stream().map(Student::new).forEach(System.out::println);

    }
}
